﻿<?php

class TRelChave{

    private $conteudo;
    
    public function __construct(array $conteudo) 
    {
        $this->conteudo = $conteudo;       
    }
        
    public function render()
    {
        $tabela = new TTableChave($this->conteudo);
        $html = $tabela->render();
        
        //var_dump($this->conteudo);
        
        $pdf = new TRelatorio();
        $pdf->pdf->writeHTML(utf8_encode($html));
        $pdf->pdf->Output('chaves '.date('d m Y').'.pdf','D');
        //header('location: index.php');
    }
    
}





?>
